using System;
using System.BusinessObjects.Transactions;
using Blazing.BusinessObjects.Cms;
using NHibernate;
using NHibernate.Criterion;

namespace Blazing.BusinessObjects.Queries
{
    public class QrySearchStatisticReferrersByUrl
    {
        public static ICriteria Query(string url)
        {
            ICriteria qry = UnitOfWork.CurrentSession.CreateCriteria(typeof(StatisticReferrer));
            qry.Add(Expression.Eq("Url", url));
            qry.AddOrder(Order.Asc("Url"));

            qry.SetCacheable(true);
            return qry;
        }
    }
}
